package com.fuhao.factory.methodfactory.two;

public class Test {
	public static void main(String[] args) {
		//Mysql访问用户表
		DbFactory mysqlFactory = new MySqlFactory();
		IUser iUser1 = mysqlFactory.dbType();
		iUser1.createUser();
		iUser1.getUserById(1);
		
		//oracle访问用户表
		DbFactory oracleFactory = new OracelFactory();
		IUser iUser2 = oracleFactory.dbType();
		iUser2.createUser();
		iUser2.getUserById(1);
	}
}
